package model.preprocessor;


/**
 * Class for managing of Hypre parameter.
 * @author stephane
 *
 */
public class HypreParameter extends PreProcessorParameter {

	public static final int NOT_USED = -4;
	public static final int MIN_VERBOSITY = 0;
	public static final int MAX_VERBOSITY = 3;
	
	private int verbosity = NOT_USED;

	public int getVerbosity() {
		return verbosity;
	}

	public boolean setVerbosity(int verbosity) {
		if(verbosity != NOT_USED && (verbosity > MAX_VERBOSITY || verbosity < MIN_VERBOSITY))
			return false;
			
		this.verbosity = verbosity;
		return true;
	}
	
	/**
	 * check if the parameters respect are coherent : like if the timeout is correct
	 * @return
	 */
	public boolean basicCheck(){
		if(!super.basicCheck())
			return false;
		
		if(verbosity != NOT_USED && (verbosity > MAX_VERBOSITY || verbosity < MIN_VERBOSITY))
			return false;
			
		return true;
	}
	
	public HypreParameter(String out) {
		super(out);
	}

	public HypreParameter() {
	}

}
